home *** CD-ROM | disk | FTP | other *** search
- Path: news.vanderbilt.edu!news
- From: "Marcus H. Mendenhall" <mendenm@ctrvax.vanderbilt.edu>
- Newsgroups: comp.lang.c
- Subject: Re: Splitting String ?
- Date: Mon, 15 Jan 1996 08:46:34 +0000
- Organization: Vanderbilt University, Nashville, TN, USA
- Message-ID: <30FA146A.761F@ctrvax.vanderbilt.edu>
- References: <HAKOLA.96Jan12151128@jung.hut.fi>
- NNTP-Posting-Host: 129.59.235.1
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Macintosh; I; PPC)
-
- Petri Hakola wrote:
- >
- > Have I missed something (again:) or why doesn't this code
- > work? - P
-
- One problem is with allocation of space: when you call newname with
- a constant string, you are trying to append directly onto the end of
- the string, which can have disastrous result: overwriting of another
- variable or, in a protected memory system, a fault (the string might
- be in read-only space).
-